Left Termination of the query pattern perm_in_2(g, a) w.r.t. the given Prolog program could successfully be proven:



Prolog
  ↳ PrologToPiTRSProof

Clauses:

perm([], []).
perm(L, .(H, T)) :- ','(append2(V, .(H, U), L), ','(append1(V, U, W), perm(W, T))).
append1([], L, L).
append1(.(H, L1), L2, .(H, L3)) :- append1(L1, L2, L3).
append2([], L, L).
append2(.(H, L1), L2, .(H, L3)) :- append2(L1, L2, L3).

Queries:

perm(g,a).

We use the technique of [30]. With regard to the inferred argument filtering the predicates were used in the following modes:
perm_in: (b,f)
append2_in: (f,f,b)
append1_in: (b,b,f)
Transforming Prolog into the following Term Rewriting System:
Pi-finite rewrite system:
The TRS R consists of the following rules:

perm_in_ga([], []) → perm_out_ga([], [])
perm_in_ga(L, .(H, T)) → U1_ga(L, H, T, append2_in_aag(V, .(H, U), L))
append2_in_aag([], L, L) → append2_out_aag([], L, L)
append2_in_aag(.(H, L1), L2, .(H, L3)) → U5_aag(H, L1, L2, L3, append2_in_aag(L1, L2, L3))
U5_aag(H, L1, L2, L3, append2_out_aag(L1, L2, L3)) → append2_out_aag(.(H, L1), L2, .(H, L3))
U1_ga(L, H, T, append2_out_aag(V, .(H, U), L)) → U2_ga(L, H, T, append1_in_gga(V, U, W))
append1_in_gga([], L, L) → append1_out_gga([], L, L)
append1_in_gga(.(H, L1), L2, .(H, L3)) → U4_gga(H, L1, L2, L3, append1_in_gga(L1, L2, L3))
U4_gga(H, L1, L2, L3, append1_out_gga(L1, L2, L3)) → append1_out_gga(.(H, L1), L2, .(H, L3))
U2_ga(L, H, T, append1_out_gga(V, U, W)) → U3_ga(L, H, T, perm_in_ga(W, T))
U3_ga(L, H, T, perm_out_ga(W, T)) → perm_out_ga(L, .(H, T))

The argument filtering Pi contains the following mapping:
perm_in_ga(x1, x2)  =  perm_in_ga(x1)
[]  =  []
perm_out_ga(x1, x2)  =  perm_out_ga(x2)
U1_ga(x1, x2, x3, x4)  =  U1_ga(x4)
append2_in_aag(x1, x2, x3)  =  append2_in_aag(x3)
append2_out_aag(x1, x2, x3)  =  append2_out_aag(x1, x2)
.(x1, x2)  =  .(x1, x2)
U5_aag(x1, x2, x3, x4, x5)  =  U5_aag(x1, x5)
U2_ga(x1, x2, x3, x4)  =  U2_ga(x2, x4)
append1_in_gga(x1, x2, x3)  =  append1_in_gga(x1, x2)
append1_out_gga(x1, x2, x3)  =  append1_out_gga(x3)
U4_gga(x1, x2, x3, x4, x5)  =  U4_gga(x1, x5)
U3_ga(x1, x2, x3, x4)  =  U3_ga(x2, x4)

Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog



↳ Prolog
  ↳ PrologToPiTRSProof
PiTRS
      ↳ DependencyPairsProof

Pi-finite rewrite system:
The TRS R consists of the following rules:

perm_in_ga([], []) → perm_out_ga([], [])
perm_in_ga(L, .(H, T)) → U1_ga(L, H, T, append2_in_aag(V, .(H, U), L))
append2_in_aag([], L, L) → append2_out_aag([], L, L)
append2_in_aag(.(H, L1), L2, .(H, L3)) → U5_aag(H, L1, L2, L3, append2_in_aag(L1, L2, L3))
U5_aag(H, L1, L2, L3, append2_out_aag(L1, L2, L3)) → append2_out_aag(.(H, L1), L2, .(H, L3))
U1_ga(L, H, T, append2_out_aag(V, .(H, U), L)) → U2_ga(L, H, T, append1_in_gga(V, U, W))
append1_in_gga([], L, L) → append1_out_gga([], L, L)
append1_in_gga(.(H, L1), L2, .(H, L3)) → U4_gga(H, L1, L2, L3, append1_in_gga(L1, L2, L3))
U4_gga(H, L1, L2, L3, append1_out_gga(L1, L2, L3)) → append1_out_gga(.(H, L1), L2, .(H, L3))
U2_ga(L, H, T, append1_out_gga(V, U, W)) → U3_ga(L, H, T, perm_in_ga(W, T))
U3_ga(L, H, T, perm_out_ga(W, T)) → perm_out_ga(L, .(H, T))

The argument filtering Pi contains the following mapping:
perm_in_ga(x1, x2)  =  perm_in_ga(x1)
[]  =  []
perm_out_ga(x1, x2)  =  perm_out_ga(x2)
U1_ga(x1, x2, x3, x4)  =  U1_ga(x4)
append2_in_aag(x1, x2, x3)  =  append2_in_aag(x3)
append2_out_aag(x1, x2, x3)  =  append2_out_aag(x1, x2)
.(x1, x2)  =  .(x1, x2)
U5_aag(x1, x2, x3, x4, x5)  =  U5_aag(x1, x5)
U2_ga(x1, x2, x3, x4)  =  U2_ga(x2, x4)
append1_in_gga(x1, x2, x3)  =  append1_in_gga(x1, x2)
append1_out_gga(x1, x2, x3)  =  append1_out_gga(x3)
U4_gga(x1, x2, x3, x4, x5)  =  U4_gga(x1, x5)
U3_ga(x1, x2, x3, x4)  =  U3_ga(x2, x4)


Using Dependency Pairs [1,30] we result in the following initial DP problem:
Pi DP problem:
The TRS P consists of the following rules:

PERM_IN_GA(L, .(H, T)) → U1_GA(L, H, T, append2_in_aag(V, .(H, U), L))
PERM_IN_GA(L, .(H, T)) → APPEND2_IN_AAG(V, .(H, U), L)
APPEND2_IN_AAG(.(H, L1), L2, .(H, L3)) → U5_AAG(H, L1, L2, L3, append2_in_aag(L1, L2, L3))
APPEND2_IN_AAG(.(H, L1), L2, .(H, L3)) → APPEND2_IN_AAG(L1, L2, L3)
U1_GA(L, H, T, append2_out_aag(V, .(H, U), L)) → U2_GA(L, H, T, append1_in_gga(V, U, W))
U1_GA(L, H, T, append2_out_aag(V, .(H, U), L)) → APPEND1_IN_GGA(V, U, W)
APPEND1_IN_GGA(.(H, L1), L2, .(H, L3)) → U4_GGA(H, L1, L2, L3, append1_in_gga(L1, L2, L3))
APPEND1_IN_GGA(.(H, L1), L2, .(H, L3)) → APPEND1_IN_GGA(L1, L2, L3)
U2_GA(L, H, T, append1_out_gga(V, U, W)) → U3_GA(L, H, T, perm_in_ga(W, T))
U2_GA(L, H, T, append1_out_gga(V, U, W)) → PERM_IN_GA(W, T)

The TRS R consists of the following rules:

perm_in_ga([], []) → perm_out_ga([], [])
perm_in_ga(L, .(H, T)) → U1_ga(L, H, T, append2_in_aag(V, .(H, U), L))
append2_in_aag([], L, L) → append2_out_aag([], L, L)
append2_in_aag(.(H, L1), L2, .(H, L3)) → U5_aag(H, L1, L2, L3, append2_in_aag(L1, L2, L3))
U5_aag(H, L1, L2, L3, append2_out_aag(L1, L2, L3)) → append2_out_aag(.(H, L1), L2, .(H, L3))
U1_ga(L, H, T, append2_out_aag(V, .(H, U), L)) → U2_ga(L, H, T, append1_in_gga(V, U, W))
append1_in_gga([], L, L) → append1_out_gga([], L, L)
append1_in_gga(.(H, L1), L2, .(H, L3)) → U4_gga(H, L1, L2, L3, append1_in_gga(L1, L2, L3))
U4_gga(H, L1, L2, L3, append1_out_gga(L1, L2, L3)) → append1_out_gga(.(H, L1), L2, .(H, L3))
U2_ga(L, H, T, append1_out_gga(V, U, W)) → U3_ga(L, H, T, perm_in_ga(W, T))
U3_ga(L, H, T, perm_out_ga(W, T)) → perm_out_ga(L, .(H, T))

The argument filtering Pi contains the following mapping:
perm_in_ga(x1, x2)  =  perm_in_ga(x1)
[]  =  []
perm_out_ga(x1, x2)  =  perm_out_ga(x2)
U1_ga(x1, x2, x3, x4)  =  U1_ga(x4)
append2_in_aag(x1, x2, x3)  =  append2_in_aag(x3)
append2_out_aag(x1, x2, x3)  =  append2_out_aag(x1, x2)
.(x1, x2)  =  .(x1, x2)
U5_aag(x1, x2, x3, x4, x5)  =  U5_aag(x1, x5)
U2_ga(x1, x2, x3, x4)  =  U2_ga(x2, x4)
append1_in_gga(x1, x2, x3)  =  append1_in_gga(x1, x2)
append1_out_gga(x1, x2, x3)  =  append1_out_gga(x3)
U4_gga(x1, x2, x3, x4, x5)  =  U4_gga(x1, x5)
U3_ga(x1, x2, x3, x4)  =  U3_ga(x2, x4)
APPEND2_IN_AAG(x1, x2, x3)  =  APPEND2_IN_AAG(x3)
U4_GGA(x1, x2, x3, x4, x5)  =  U4_GGA(x1, x5)
U3_GA(x1, x2, x3, x4)  =  U3_GA(x2, x4)
U2_GA(x1, x2, x3, x4)  =  U2_GA(x2, x4)
U1_GA(x1, x2, x3, x4)  =  U1_GA(x4)
U5_AAG(x1, x2, x3, x4, x5)  =  U5_AAG(x1, x5)
PERM_IN_GA(x1, x2)  =  PERM_IN_GA(x1)
APPEND1_IN_GGA(x1, x2, x3)  =  APPEND1_IN_GGA(x1, x2)

We have to consider all (P,R,Pi)-chains

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
PiDP
          ↳ DependencyGraphProof

Pi DP problem:
The TRS P consists of the following rules:

PERM_IN_GA(L, .(H, T)) → U1_GA(L, H, T, append2_in_aag(V, .(H, U), L))
PERM_IN_GA(L, .(H, T)) → APPEND2_IN_AAG(V, .(H, U), L)
APPEND2_IN_AAG(.(H, L1), L2, .(H, L3)) → U5_AAG(H, L1, L2, L3, append2_in_aag(L1, L2, L3))
APPEND2_IN_AAG(.(H, L1), L2, .(H, L3)) → APPEND2_IN_AAG(L1, L2, L3)
U1_GA(L, H, T, append2_out_aag(V, .(H, U), L)) → U2_GA(L, H, T, append1_in_gga(V, U, W))
U1_GA(L, H, T, append2_out_aag(V, .(H, U), L)) → APPEND1_IN_GGA(V, U, W)
APPEND1_IN_GGA(.(H, L1), L2, .(H, L3)) → U4_GGA(H, L1, L2, L3, append1_in_gga(L1, L2, L3))
APPEND1_IN_GGA(.(H, L1), L2, .(H, L3)) → APPEND1_IN_GGA(L1, L2, L3)
U2_GA(L, H, T, append1_out_gga(V, U, W)) → U3_GA(L, H, T, perm_in_ga(W, T))
U2_GA(L, H, T, append1_out_gga(V, U, W)) → PERM_IN_GA(W, T)

The TRS R consists of the following rules:

perm_in_ga([], []) → perm_out_ga([], [])
perm_in_ga(L, .(H, T)) → U1_ga(L, H, T, append2_in_aag(V, .(H, U), L))
append2_in_aag([], L, L) → append2_out_aag([], L, L)
append2_in_aag(.(H, L1), L2, .(H, L3)) → U5_aag(H, L1, L2, L3, append2_in_aag(L1, L2, L3))
U5_aag(H, L1, L2, L3, append2_out_aag(L1, L2, L3)) → append2_out_aag(.(H, L1), L2, .(H, L3))
U1_ga(L, H, T, append2_out_aag(V, .(H, U), L)) → U2_ga(L, H, T, append1_in_gga(V, U, W))
append1_in_gga([], L, L) → append1_out_gga([], L, L)
append1_in_gga(.(H, L1), L2, .(H, L3)) → U4_gga(H, L1, L2, L3, append1_in_gga(L1, L2, L3))
U4_gga(H, L1, L2, L3, append1_out_gga(L1, L2, L3)) → append1_out_gga(.(H, L1), L2, .(H, L3))
U2_ga(L, H, T, append1_out_gga(V, U, W)) → U3_ga(L, H, T, perm_in_ga(W, T))
U3_ga(L, H, T, perm_out_ga(W, T)) → perm_out_ga(L, .(H, T))

The argument filtering Pi contains the following mapping:
perm_in_ga(x1, x2)  =  perm_in_ga(x1)
[]  =  []
perm_out_ga(x1, x2)  =  perm_out_ga(x2)
U1_ga(x1, x2, x3, x4)  =  U1_ga(x4)
append2_in_aag(x1, x2, x3)  =  append2_in_aag(x3)
append2_out_aag(x1, x2, x3)  =  append2_out_aag(x1, x2)
.(x1, x2)  =  .(x1, x2)
U5_aag(x1, x2, x3, x4, x5)  =  U5_aag(x1, x5)
U2_ga(x1, x2, x3, x4)  =  U2_ga(x2, x4)
append1_in_gga(x1, x2, x3)  =  append1_in_gga(x1, x2)
append1_out_gga(x1, x2, x3)  =  append1_out_gga(x3)
U4_gga(x1, x2, x3, x4, x5)  =  U4_gga(x1, x5)
U3_ga(x1, x2, x3, x4)  =  U3_ga(x2, x4)
APPEND2_IN_AAG(x1, x2, x3)  =  APPEND2_IN_AAG(x3)
U4_GGA(x1, x2, x3, x4, x5)  =  U4_GGA(x1, x5)
U3_GA(x1, x2, x3, x4)  =  U3_GA(x2, x4)
U2_GA(x1, x2, x3, x4)  =  U2_GA(x2, x4)
U1_GA(x1, x2, x3, x4)  =  U1_GA(x4)
U5_AAG(x1, x2, x3, x4, x5)  =  U5_AAG(x1, x5)
PERM_IN_GA(x1, x2)  =  PERM_IN_GA(x1)
APPEND1_IN_GGA(x1, x2, x3)  =  APPEND1_IN_GGA(x1, x2)

We have to consider all (P,R,Pi)-chains
The approximation of the Dependency Graph [30] contains 3 SCCs with 5 less nodes.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
PiDP
                ↳ UsableRulesProof
              ↳ PiDP
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

APPEND1_IN_GGA(.(H, L1), L2, .(H, L3)) → APPEND1_IN_GGA(L1, L2, L3)

The TRS R consists of the following rules:

perm_in_ga([], []) → perm_out_ga([], [])
perm_in_ga(L, .(H, T)) → U1_ga(L, H, T, append2_in_aag(V, .(H, U), L))
append2_in_aag([], L, L) → append2_out_aag([], L, L)
append2_in_aag(.(H, L1), L2, .(H, L3)) → U5_aag(H, L1, L2, L3, append2_in_aag(L1, L2, L3))
U5_aag(H, L1, L2, L3, append2_out_aag(L1, L2, L3)) → append2_out_aag(.(H, L1), L2, .(H, L3))
U1_ga(L, H, T, append2_out_aag(V, .(H, U), L)) → U2_ga(L, H, T, append1_in_gga(V, U, W))
append1_in_gga([], L, L) → append1_out_gga([], L, L)
append1_in_gga(.(H, L1), L2, .(H, L3)) → U4_gga(H, L1, L2, L3, append1_in_gga(L1, L2, L3))
U4_gga(H, L1, L2, L3, append1_out_gga(L1, L2, L3)) → append1_out_gga(.(H, L1), L2, .(H, L3))
U2_ga(L, H, T, append1_out_gga(V, U, W)) → U3_ga(L, H, T, perm_in_ga(W, T))
U3_ga(L, H, T, perm_out_ga(W, T)) → perm_out_ga(L, .(H, T))

The argument filtering Pi contains the following mapping:
perm_in_ga(x1, x2)  =  perm_in_ga(x1)
[]  =  []
perm_out_ga(x1, x2)  =  perm_out_ga(x2)
U1_ga(x1, x2, x3, x4)  =  U1_ga(x4)
append2_in_aag(x1, x2, x3)  =  append2_in_aag(x3)
append2_out_aag(x1, x2, x3)  =  append2_out_aag(x1, x2)
.(x1, x2)  =  .(x1, x2)
U5_aag(x1, x2, x3, x4, x5)  =  U5_aag(x1, x5)
U2_ga(x1, x2, x3, x4)  =  U2_ga(x2, x4)
append1_in_gga(x1, x2, x3)  =  append1_in_gga(x1, x2)
append1_out_gga(x1, x2, x3)  =  append1_out_gga(x3)
U4_gga(x1, x2, x3, x4, x5)  =  U4_gga(x1, x5)
U3_ga(x1, x2, x3, x4)  =  U3_ga(x2, x4)
APPEND1_IN_GGA(x1, x2, x3)  =  APPEND1_IN_GGA(x1, x2)

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof
              ↳ PiDP
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

APPEND1_IN_GGA(.(H, L1), L2, .(H, L3)) → APPEND1_IN_GGA(L1, L2, L3)

R is empty.
The argument filtering Pi contains the following mapping:
.(x1, x2)  =  .(x1, x2)
APPEND1_IN_GGA(x1, x2, x3)  =  APPEND1_IN_GGA(x1, x2)

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ QDPSizeChangeProof
              ↳ PiDP
              ↳ PiDP

Q DP problem:
The TRS P consists of the following rules:

APPEND1_IN_GGA(.(H, L1), L2) → APPEND1_IN_GGA(L1, L2)

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
PiDP
                ↳ UsableRulesProof
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

APPEND2_IN_AAG(.(H, L1), L2, .(H, L3)) → APPEND2_IN_AAG(L1, L2, L3)

The TRS R consists of the following rules:

perm_in_ga([], []) → perm_out_ga([], [])
perm_in_ga(L, .(H, T)) → U1_ga(L, H, T, append2_in_aag(V, .(H, U), L))
append2_in_aag([], L, L) → append2_out_aag([], L, L)
append2_in_aag(.(H, L1), L2, .(H, L3)) → U5_aag(H, L1, L2, L3, append2_in_aag(L1, L2, L3))
U5_aag(H, L1, L2, L3, append2_out_aag(L1, L2, L3)) → append2_out_aag(.(H, L1), L2, .(H, L3))
U1_ga(L, H, T, append2_out_aag(V, .(H, U), L)) → U2_ga(L, H, T, append1_in_gga(V, U, W))
append1_in_gga([], L, L) → append1_out_gga([], L, L)
append1_in_gga(.(H, L1), L2, .(H, L3)) → U4_gga(H, L1, L2, L3, append1_in_gga(L1, L2, L3))
U4_gga(H, L1, L2, L3, append1_out_gga(L1, L2, L3)) → append1_out_gga(.(H, L1), L2, .(H, L3))
U2_ga(L, H, T, append1_out_gga(V, U, W)) → U3_ga(L, H, T, perm_in_ga(W, T))
U3_ga(L, H, T, perm_out_ga(W, T)) → perm_out_ga(L, .(H, T))

The argument filtering Pi contains the following mapping:
perm_in_ga(x1, x2)  =  perm_in_ga(x1)
[]  =  []
perm_out_ga(x1, x2)  =  perm_out_ga(x2)
U1_ga(x1, x2, x3, x4)  =  U1_ga(x4)
append2_in_aag(x1, x2, x3)  =  append2_in_aag(x3)
append2_out_aag(x1, x2, x3)  =  append2_out_aag(x1, x2)
.(x1, x2)  =  .(x1, x2)
U5_aag(x1, x2, x3, x4, x5)  =  U5_aag(x1, x5)
U2_ga(x1, x2, x3, x4)  =  U2_ga(x2, x4)
append1_in_gga(x1, x2, x3)  =  append1_in_gga(x1, x2)
append1_out_gga(x1, x2, x3)  =  append1_out_gga(x3)
U4_gga(x1, x2, x3, x4, x5)  =  U4_gga(x1, x5)
U3_ga(x1, x2, x3, x4)  =  U3_ga(x2, x4)
APPEND2_IN_AAG(x1, x2, x3)  =  APPEND2_IN_AAG(x3)

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

APPEND2_IN_AAG(.(H, L1), L2, .(H, L3)) → APPEND2_IN_AAG(L1, L2, L3)

R is empty.
The argument filtering Pi contains the following mapping:
.(x1, x2)  =  .(x1, x2)
APPEND2_IN_AAG(x1, x2, x3)  =  APPEND2_IN_AAG(x3)

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ QDPSizeChangeProof
              ↳ PiDP

Q DP problem:
The TRS P consists of the following rules:

APPEND2_IN_AAG(.(H, L3)) → APPEND2_IN_AAG(L3)

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
PiDP
                ↳ UsableRulesProof

Pi DP problem:
The TRS P consists of the following rules:

U2_GA(L, H, T, append1_out_gga(V, U, W)) → PERM_IN_GA(W, T)
PERM_IN_GA(L, .(H, T)) → U1_GA(L, H, T, append2_in_aag(V, .(H, U), L))
U1_GA(L, H, T, append2_out_aag(V, .(H, U), L)) → U2_GA(L, H, T, append1_in_gga(V, U, W))

The TRS R consists of the following rules:

perm_in_ga([], []) → perm_out_ga([], [])
perm_in_ga(L, .(H, T)) → U1_ga(L, H, T, append2_in_aag(V, .(H, U), L))
append2_in_aag([], L, L) → append2_out_aag([], L, L)
append2_in_aag(.(H, L1), L2, .(H, L3)) → U5_aag(H, L1, L2, L3, append2_in_aag(L1, L2, L3))
U5_aag(H, L1, L2, L3, append2_out_aag(L1, L2, L3)) → append2_out_aag(.(H, L1), L2, .(H, L3))
U1_ga(L, H, T, append2_out_aag(V, .(H, U), L)) → U2_ga(L, H, T, append1_in_gga(V, U, W))
append1_in_gga([], L, L) → append1_out_gga([], L, L)
append1_in_gga(.(H, L1), L2, .(H, L3)) → U4_gga(H, L1, L2, L3, append1_in_gga(L1, L2, L3))
U4_gga(H, L1, L2, L3, append1_out_gga(L1, L2, L3)) → append1_out_gga(.(H, L1), L2, .(H, L3))
U2_ga(L, H, T, append1_out_gga(V, U, W)) → U3_ga(L, H, T, perm_in_ga(W, T))
U3_ga(L, H, T, perm_out_ga(W, T)) → perm_out_ga(L, .(H, T))

The argument filtering Pi contains the following mapping:
perm_in_ga(x1, x2)  =  perm_in_ga(x1)
[]  =  []
perm_out_ga(x1, x2)  =  perm_out_ga(x2)
U1_ga(x1, x2, x3, x4)  =  U1_ga(x4)
append2_in_aag(x1, x2, x3)  =  append2_in_aag(x3)
append2_out_aag(x1, x2, x3)  =  append2_out_aag(x1, x2)
.(x1, x2)  =  .(x1, x2)
U5_aag(x1, x2, x3, x4, x5)  =  U5_aag(x1, x5)
U2_ga(x1, x2, x3, x4)  =  U2_ga(x2, x4)
append1_in_gga(x1, x2, x3)  =  append1_in_gga(x1, x2)
append1_out_gga(x1, x2, x3)  =  append1_out_gga(x3)
U4_gga(x1, x2, x3, x4, x5)  =  U4_gga(x1, x5)
U3_ga(x1, x2, x3, x4)  =  U3_ga(x2, x4)
U2_GA(x1, x2, x3, x4)  =  U2_GA(x2, x4)
U1_GA(x1, x2, x3, x4)  =  U1_GA(x4)
PERM_IN_GA(x1, x2)  =  PERM_IN_GA(x1)

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof

Pi DP problem:
The TRS P consists of the following rules:

U2_GA(L, H, T, append1_out_gga(V, U, W)) → PERM_IN_GA(W, T)
PERM_IN_GA(L, .(H, T)) → U1_GA(L, H, T, append2_in_aag(V, .(H, U), L))
U1_GA(L, H, T, append2_out_aag(V, .(H, U), L)) → U2_GA(L, H, T, append1_in_gga(V, U, W))

The TRS R consists of the following rules:

append2_in_aag([], L, L) → append2_out_aag([], L, L)
append2_in_aag(.(H, L1), L2, .(H, L3)) → U5_aag(H, L1, L2, L3, append2_in_aag(L1, L2, L3))
append1_in_gga([], L, L) → append1_out_gga([], L, L)
append1_in_gga(.(H, L1), L2, .(H, L3)) → U4_gga(H, L1, L2, L3, append1_in_gga(L1, L2, L3))
U5_aag(H, L1, L2, L3, append2_out_aag(L1, L2, L3)) → append2_out_aag(.(H, L1), L2, .(H, L3))
U4_gga(H, L1, L2, L3, append1_out_gga(L1, L2, L3)) → append1_out_gga(.(H, L1), L2, .(H, L3))

The argument filtering Pi contains the following mapping:
[]  =  []
append2_in_aag(x1, x2, x3)  =  append2_in_aag(x3)
append2_out_aag(x1, x2, x3)  =  append2_out_aag(x1, x2)
.(x1, x2)  =  .(x1, x2)
U5_aag(x1, x2, x3, x4, x5)  =  U5_aag(x1, x5)
append1_in_gga(x1, x2, x3)  =  append1_in_gga(x1, x2)
append1_out_gga(x1, x2, x3)  =  append1_out_gga(x3)
U4_gga(x1, x2, x3, x4, x5)  =  U4_gga(x1, x5)
U2_GA(x1, x2, x3, x4)  =  U2_GA(x2, x4)
U1_GA(x1, x2, x3, x4)  =  U1_GA(x4)
PERM_IN_GA(x1, x2)  =  PERM_IN_GA(x1)

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ RuleRemovalProof

Q DP problem:
The TRS P consists of the following rules:

PERM_IN_GA(L) → U1_GA(append2_in_aag(L))
U1_GA(append2_out_aag(V, .(H, U))) → U2_GA(H, append1_in_gga(V, U))
U2_GA(H, append1_out_gga(W)) → PERM_IN_GA(W)

The TRS R consists of the following rules:

append2_in_aag(L) → append2_out_aag([], L)
append2_in_aag(.(H, L3)) → U5_aag(H, append2_in_aag(L3))
append1_in_gga([], L) → append1_out_gga(L)
append1_in_gga(.(H, L1), L2) → U4_gga(H, append1_in_gga(L1, L2))
U5_aag(H, append2_out_aag(L1, L2)) → append2_out_aag(.(H, L1), L2)
U4_gga(H, append1_out_gga(L3)) → append1_out_gga(.(H, L3))

The set Q consists of the following terms:

append2_in_aag(x0)
append1_in_gga(x0, x1)
U5_aag(x0, x1)
U4_gga(x0, x1)

We have to consider all (P,Q,R)-chains.
By using the rule removal processor [15] with the following polynomial ordering [25], at least one Dependency Pair or term rewrite system rule of this QDP problem can be strictly oriented.
Strictly oriented dependency pairs:

PERM_IN_GA(L) → U1_GA(append2_in_aag(L))


Used ordering: POLO with Polynomial interpretation [25]:

POL(.(x1, x2)) = 1 + 2·x1 + x2   
POL(PERM_IN_GA(x1)) = 1 + x1   
POL(U1_GA(x1)) = x1   
POL(U2_GA(x1, x2)) = 1 + 2·x1 + x2   
POL(U4_gga(x1, x2)) = 1 + 2·x1 + x2   
POL(U5_aag(x1, x2)) = 1 + 2·x1 + x2   
POL([]) = 0   
POL(append1_in_gga(x1, x2)) = x1 + x2   
POL(append1_out_gga(x1)) = x1   
POL(append2_in_aag(x1)) = x1   
POL(append2_out_aag(x1, x2)) = x1 + x2   



↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ RuleRemovalProof
QDP
                            ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

U1_GA(append2_out_aag(V, .(H, U))) → U2_GA(H, append1_in_gga(V, U))
U2_GA(H, append1_out_gga(W)) → PERM_IN_GA(W)

The TRS R consists of the following rules:

append2_in_aag(L) → append2_out_aag([], L)
append2_in_aag(.(H, L3)) → U5_aag(H, append2_in_aag(L3))
append1_in_gga([], L) → append1_out_gga(L)
append1_in_gga(.(H, L1), L2) → U4_gga(H, append1_in_gga(L1, L2))
U5_aag(H, append2_out_aag(L1, L2)) → append2_out_aag(.(H, L1), L2)
U4_gga(H, append1_out_gga(L3)) → append1_out_gga(.(H, L3))

The set Q consists of the following terms:

append2_in_aag(x0)
append1_in_gga(x0, x1)
U5_aag(x0, x1)
U4_gga(x0, x1)

We have to consider all (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 0 SCCs with 2 less nodes.